package com.biz.primus.ms.depot.dao.po;

import com.biz.primus.base.enums.CommonStatus;
import com.biz.primus.model.depot.enums.QrTypeEnum;
import com.biz.primus.ms.base.jpa.po.BaseEntity;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * QrCode
 *
 * @author JKLiues
 * @date 2017年11月07日
 */
@Getter
@Setter
@Entity
@Table(name = "tb_qr_code", indexes = {@Index(name = "IDX_QR_RELATION_ID", columnList = "relationId")})
public class QrCode extends BaseEntity {
    private static final long serialVersionUID = -7032862770276122613L;

    @Column
    private String qrCode;

    /**
     * 二维码类型
     */
    @Enumerated(EnumType.STRING)
    private QrTypeEnum type;

    /**
     * 描述
     */
    @Column
    private String description;

    /**
     * 参数
     */
    @Column
    private String param;

    /**
     * 关联ID
     */
    @Column(nullable = false)
    private Long relationId;

    /**
     * 生效时间
     */
    @Column
    private Timestamp beginTime;

    /**
     * 失效时间
     */
    @Column
    private Timestamp endTime;

    /**
     * 删除标记
     */
    private CommonStatus status;
}